<ng-container *ngIf="currentPage===pageTypeEnum.List">
  <app-page-header [pageHeaderInfo]="pageHeaderInfo"></app-page-header>
  <div class="normal-table-wrap">
    <nz-card [nzBodyStyle]="{'padding-bottom':0}" class="m-b-10">
      <form nz-form>
        <div nz-row [nzGutter]="{ xs: 6, sm: 16, md: 24}">
          <div nz-col [nzXXl]="6" [nzXl]="6" [nzLg]="6" [nzMd]="12" nzSm="24" nzXs="24">
            <nz-form-item>
              <nz-form-label [nzFor]="">题目类型</nz-form-label>
              <nz-form-control>
                <nz-select name="type" [(ngModel)]="searchParam.type" nzPlaceHolder="选择题目类型" nzAllowClear>
                  <nz-option *ngFor="let item of testQuestionOptions" [nzValue]="item.value"
                             [nzLabel]="item.label"></nz-option>
                </nz-select>
              </nz-form-control>
            </nz-form-item>
          </div>
          <div nz-col [nzXXl]="6" [nzXl]="6" [nzLg]="6" [nzMd]="12" nzSm="24" nzXs="24">
            <nz-form-item>
              <nz-form-label [nzFor]="">题库搜索</nz-form-label>
              <nz-form-control>
                <nz-select
                  nzMode="multiple"
                  nzPlaceHolder="选择题库"
                  [(ngModel)]="searchParam.questionBankId"
                  [ngModelOptions]="{ standalone: true }"
                  [nzAllowClear]="true"
                >
                  <nz-option *ngFor="let item of listOfOption" [nzLabel]="item.label"
                             [nzValue]="item.value"></nz-option>
                </nz-select>
              </nz-form-control>
            </nz-form-item>
          </div>
          <div nz-col [nzXXl]="6" [nzXl]="6" [nzLg]="6" [nzMd]="12" nzSm="24" nzXs="24">
            <nz-form-item>
              <nz-form-label [nzFor]="">题目内容</nz-form-label>
              <nz-form-control>
                <input nz-input name="content" [(ngModel)]="searchParam.content" placeholder="题目内容"/>
              </nz-form-control>
            </nz-form-item>
          </div>
          <div nz-col [nzXXl]="6" [nzXl]="6" [nzLg]="6" [nzMd]="12" nzSm="24" nzXs="24" class="text-right">
            <button nz-button [nzType]="'primary'" (click)="getDataList()"><i nz-icon nzType="search"></i>搜索</button>
            <button nz-button class="m-l-15" (click)="resetForm()"><i nz-icon nzType="close-circle"
                                                                      nzTheme="outline"></i>重置
            </button>
          </div>
        </div>
      </form>
    </nz-card>
    <app-card-table-wrap [actionCode]="actionCodeObj" [needAddBtn]="true" [needDelBtn]="true" (add)="add()"
                         (del)="allDel()">
      <app-ant-table (selectedChange)="selectedChecked($event)" [checkedCashArrayFromComment]="checkedCashArray"
                     (changePageSize)="changePageSize($event)" (changePageNum)="getDataList($event)"
                     [tableConfig]="tableConfig" [tableData]="dataList"></app-ant-table>
    </app-card-table-wrap>
  </div>
</ng-container>
<ng-container *ngIf="currentPage===pageTypeEnum.AddOrEdit">
  <app-add-edit-test [currentPageNum]="tableConfig.pageIndex" [id]="itemId"
                     (returnBack)="returnToList($event)"></app-add-edit-test>
</ng-container>
<ng-template #operationTpl let-id="id">
  <span *appAuth="ActionCode.TestQuestionEdit" class="operate-text" (click)="edit(id)"><i nz-icon nzType="edit"
                                                                                          nzTheme="fill"></i>编辑</span>
  <span *appAuth="ActionCode.TestQuestionDel" class="operate-text" (click)="del(id)"><i nz-icon nzType="delete"
                                                                                        nzTheme="fill"></i>删除</span>
</ng-template>
